/*Entry Cost Analysis
STATA 14
January 15, 2017
Appendix A6 - Floor and Celing Effects*/


cd  "C:\Users\ejm5\Dropbox\Rents_Asunder\CountryofOrigin\20160315_InternationaOrganization\Replication"
use  oecd_7years_working.dta, clear
log using floor_ceiling.smcl, replace

/*Drop all firms that entered very early*/
drop if a1<2005


hist c6 if treatment==0 & oecd==1 & phase3==0, xtitle("# of Activities", size(medium) margin(medium)) ylab(0(10)50) discrete percent fcolor(navy) addlabel scheme(s1mono) title("Signatory") legend(off)
graph save ceiling_oecd.gph, replace

hist c6 if treatment==0 & oecd==0 & phase3==0, xtitle("# of Activities", size(medium) margin(medium)) ylab(0(10)50) discrete percent fcolor(navy) addlabel  scheme(s1mono) title("Non-Signatory") legend(off)
graph save ceiling_nonoecd.gph, replace

graph combine ceiling_oecd.gph ceiling_nonoecd.gph, xcommon ycommon imargin(small) cols(2) scheme(s1mono) title("Before Phase 3")
graph save before.gph, replace

hist c6 if treatment==0 & oecd==1 & phase3==1, xtitle("# of Activities", size(medium) margin(medium)) ylab(0(10)50) discrete percent fcolor(navy) addlabel scheme(s1mono) title("Signatory") legend(off)
graph save ceiling_oecd.gph, replace

hist c6 if treatment==0 & oecd==0 & phase3==1, xtitle("# of Activities", size(medium) margin(medium)) ylab(0(10)50) discrete percent fcolor(navy) addlabel  scheme(s1mono) title("Non-Signatory") legend(off)
graph save ceiling_nonoecd.gph, replace

graph combine ceiling_oecd.gph ceiling_nonoecd.gph, xcommon ycommon imargin(small) cols(2) scheme(s1mono) title("After Phase 3")
graph save after.gph, replace

graph combine before.gph after.gph, xcommon ycommon imargin(small) rows(2) scheme(s1mono) title("Bribery at Entry")
graph save TableA61_ceilingfloor.gph, replace
log close

